<?php
// No direct access to this file
defined('_JEXEC') or die('Restricted access');

for($i=0; $i<sizeof($this->items); $i++) : 
	$item = $this->items[$i]; 
?>
	<tr class="row<?php echo $i % 2; ?>">
		<td class="center">
			<?php echo JHtml::_('grid.id', $i, $item->id); ?>
		</td>
		<td class="nowrap">
			<input type="hidden" name="id[]" value="<?php echo $item->id; ?>" />
			<input type="text" name="title[]" value="<?php echo $this->escape($item->title); ?>" title="<?php echo $this->escape($item->description); ?>" />
			<a class="jgrid" href="<?php echo JRoute::_('index.php?option=com_mariageplanner&view=layout&layout=edit&id='.$item->id);?>" title="Изменить данные">
				<span class="state edit">&nbsp;</span></a>
		</td>
		<td class="center nowrap">
			<a class="jgrid" href="<?php echo JRoute::_('index.php?option=com_mariageplanner&view=layout&id='.$item->id);?>" title="Редактировать схему"><button type="button"><span class="state config">&nbsp;</span> начать рассаживать гостей</button></a>
			<a class="jgrid" href="<?php echo JRoute::_('index.php?option=com_mariageplanner&view=layout&layout=view&id='.$item->id);?>" title="Просмотр"><button type="button"><span class="state view">&nbsp;</span> просмотр</button></a>
		</td>
		<td class="center nowrap">
			<a class="jgrid" href="javascript:void(0);" onclick="if(confirm('Вы уверены?')) return listItemTask('cb'+<?php echo $i; ?>,'layouts.delete');" title="Удалить схему"><span class="state delete"><span class="text">Удалить</span></span></a>
		</td>
		<td class="center">
			<?php echo JHtml::_('jgrid.published', $item->state, $i, 'layouts.', true, 'cb', $item->publish_up, $item->publish_down); ?>
		</td>
	</tr>
				
<?php endfor; ?>